﻿using System.Collections.Generic;
using Orchard.Environment.Extensions;
using Orchard.Environment.Extensions.Models;
using Orchard.Security.Permissions;

namespace ATTools
{
    [OrchardFeature("ATTools.VoiceCommands")]
    public class Permissions : IPermissionProvider
    {

        public static readonly Permission ManageVoiceCommands = new Permission { Description = "Manage voice commands", Name = "ManageVoiceCommands" };

        #region IPermissionProvider Members

        public virtual Feature Feature { get; set; }

        public IEnumerable<PermissionStereotype> GetDefaultStereotypes()
        {
            return new[] {
                new PermissionStereotype {
                    Name = "Administrator",
                    Permissions = new[] {ManageVoiceCommands}
                },
            };
        }

        public IEnumerable<Permission> GetPermissions()
        {
            return new[] {
                ManageVoiceCommands,
            };
        }

        #endregion
    }
}